<h1>Blogs</h1>

<table>
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Owner</th>
        <th>Actions</th>
    </tr>
<% @blogs.each do |blog| %>
    <tr>
        <td><%= blog.name %></td>
        <td><%= blog.description %></td>
        <td><%= blog.users.first.name%></td>
        <td>
            <%=link_to "View", blog_path(blog), class: "button" %>
            <%=link_to "Delete", blog_path(blog), method: :delete, class: "button" %>
        </td>
    </tr>
<% end %>
</table>

<%= link_to "Create New Blog", new_blog_path %>
